home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / ColorSync 2.6 Mac SDK / Interfaces / CMApplication.p < prev    next >
Encoding:
Text File  |  1999-05-07  |  48.0 KB  |  1,346 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMApplication.p
  3.  
  4.      Contains:    Color Matching Interfaces
  5.  
  6.      Version:    Technology:    ColorSync 2.6
  7.                  Release:    ColorSync 2.6 SDK for use with Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1992, 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT CMApplication;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CMAPPLICATION__}
  27. {$SETC __CMAPPLICATION__ := 1}
  28.  
  29. {$I+}
  30. {$SETC CMApplicationIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __QUICKDRAW__}
  37. {$I Quickdraw.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __FILES__}
  40. {$I Files.p}
  41. {$ENDC}
  42. {$IFC UNDEFINED __PRINTING__}
  43. {$I Printing.p}
  44. {$ENDC}
  45. {$IFC UNDEFINED __CMICCPROFILE__}
  46. {$I CMICCProfile.p}
  47. {$ENDC}
  48. {$IFC UNDEFINED __DISPLAYS__}
  49. {$I Displays.p}
  50. {$ENDC}
  51.  
  52.  
  53. {$PUSH}
  54. {$ALIGN MAC68K}
  55. {$LibExport+}
  56.  
  57.  
  58. CONST
  59.     kDefaultCMMSignature        = 'appl';
  60.  
  61. { Macintosh 68K trap word }
  62.     cmTrap                        = $ABEE;
  63.  
  64.  
  65. { PicComment IDs }
  66.     cmBeginProfile                = 220;
  67.     cmEndProfile                = 221;
  68.     cmEnableMatching            = 222;
  69.     cmDisableMatching            = 223;
  70.     cmComment                    = 224;
  71.  
  72. { PicComment selectors for cmComment }
  73.     cmBeginProfileSel            = 0;
  74.     cmContinueProfileSel        = 1;
  75.     cmEndProfileSel                = 2;
  76.     cmProfileIdentifierSel        = 3;
  77.  
  78.  
  79. { Defines for version 1.0 CMProfileSearchRecord.fieldMask }
  80.     cmMatchCMMType                = $00000001;
  81.     cmMatchApplProfileVersion    = $00000002;
  82.     cmMatchDataType                = $00000004;
  83.     cmMatchDeviceType            = $00000008;
  84.     cmMatchDeviceManufacturer    = $00000010;
  85.     cmMatchDeviceModel            = $00000020;
  86.     cmMatchDeviceAttributes        = $00000040;
  87.     cmMatchFlags                = $00000080;
  88.     cmMatchOptions                = $00000100;
  89.     cmMatchWhite                = $00000200;
  90.     cmMatchBlack                = $00000400;
  91.  
  92. { Defines for version 2.0 CMSearchRecord.searchMask }
  93.     cmMatchAnyProfile            = $00000000;
  94.     cmMatchProfileCMMType        = $00000001;
  95.     cmMatchProfileClass            = $00000002;
  96.     cmMatchDataColorSpace        = $00000004;
  97.     cmMatchProfileConnectionSpace = $00000008;
  98.     cmMatchManufacturer            = $00000010;
  99.     cmMatchModel                = $00000020;
  100.     cmMatchAttributes            = $00000040;
  101.     cmMatchProfileFlags            = $00000080;
  102.  
  103. { Result codes }
  104.                                                                 {  General Errors  }
  105.     cmProfileError                = -170;
  106.     cmMethodError                = -171;
  107.     cmMethodNotFound            = -175;                            {  CMM not present  }
  108.     cmProfileNotFound            = -176;                            {  Responder error  }
  109.     cmProfilesIdentical            = -177;                            {  Profiles the same  }
  110.     cmCantConcatenateError        = -178;                            {  Profile can't be concatenated  }
  111.     cmCantXYZ                    = -179;                            {  CMM cant handle XYZ space  }
  112.     cmCantDeleteProfile            = -180;                            {  Responder error  }
  113.     cmUnsupportedDataType        = -181;                            {  Responder error  }
  114.     cmNoCurrentProfile            = -182;                            {  Responder error  }
  115.                                                                 {  Profile Access Errors  }
  116.     cmElementTagNotFound        = -4200;
  117.     cmIndexRangeErr                = -4201;                        {  Tag index out of range  }
  118.     cmCantDeleteElement            = -4202;
  119.     cmFatalProfileErr            = -4203;
  120.     cmInvalidProfile            = -4204;                        {  A Profile must contain a 'cs1 ' tag to be valid  }
  121.     cmInvalidProfileLocation    = -4205;                        {  Operation not supported for this profile location  }
  122.     cmCantCopyModifiedV1Profile    = -4215;                        {  Illegal to copy version 1 profiles that have been modified  }
  123.                                                                 {  Profile Search Errors  }
  124.     cmInvalidSearch                = -4206;                        {  Bad Search Handle  }
  125.     cmSearchError                = -4207;
  126.     cmErrIncompatibleProfile    = -4208;                        {  Other ColorSync Errors  }
  127.     cmInvalidColorSpace            = -4209;                        {  Profile colorspace does not match bitmap type  }
  128.     cmInvalidSrcMap                = -4210;                        {  Source pix/bit map was invalid  }
  129.     cmInvalidDstMap                = -4211;                        {  Destination pix/bit map was invalid  }
  130.     cmNoGDevicesError            = -4212;                        {  Begin/End Matching -- no gdevices available  }
  131.     cmInvalidProfileComment        = -4213;                        {  Bad Profile comment during drawpicture  }
  132.     cmRangeOverFlow                = -4214;                        {  Color conversion warning that some output color values over/underflowed and were clipped  }
  133.     cmNamedColorNotFound        = -4216;                        {  NamedColor not found  }
  134.     cmCantGamutCheckError        = -4217;                        {  Gammut checking not supported by this ColorWorld  }
  135.  
  136. { deviceType values for ColorSync 1.0 Device Profile access }
  137.     cmSystemDevice                = 'sys ';
  138.     cmGDevice                    = 'gdev';
  139.  
  140. { Commands for CMFlattenUPP(…) }
  141.     cmOpenReadSpool                = 1;
  142.     cmOpenWriteSpool            = 2;
  143.     cmReadSpool                    = 3;
  144.     cmWriteSpool                = 4;
  145.     cmCloseSpool                = 5;
  146.  
  147. { Flags for PostScript-related functions }
  148.     cmPS7bit                    = 1;
  149.     cmPS8bit                    = 2;
  150.  
  151. { Flags for profile embedding functions }
  152.     cmEmbedWholeProfile            = $00000000;
  153.     cmEmbedProfileIdentifier    = $00000001;
  154.  
  155. { Commands for CMAccessUPP(…) }
  156.     cmOpenReadAccess            = 1;
  157.     cmOpenWriteAccess            = 2;
  158.     cmReadAccess                = 3;
  159.     cmWriteAccess                = 4;
  160.     cmCloseAccess                = 5;
  161.     cmCreateNewAccess            = 6;
  162.     cmAbortWriteAccess            = 7;
  163.     cmBeginAccess                = 8;
  164.     cmEndAccess                    = 9;
  165.  
  166.  
  167. { Abstract data type for memory-based Profile }
  168.  
  169. TYPE
  170.     CMProfileRef = ^LONGINT;
  171. { Abstract data type for Profile search result }
  172.     CMProfileSearchRef = ^LONGINT;
  173. { Abstract data type for BeginMatching(…) reference }
  174.     CMMatchRef = ^LONGINT;
  175. { Abstract data type for ColorWorld reference }
  176.     CMWorldRef = ^LONGINT;
  177. { Caller-supplied flatten function }
  178. {$IFC TYPED_FUNCTION_POINTERS}
  179.     CMFlattenProcPtr = FUNCTION(command: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr): OSErr;
  180. {$ELSEC}
  181.     CMFlattenProcPtr = ProcPtr;
  182. {$ENDC}
  183.  
  184. { Caller-supplied progress function for Bitmap & PixMap matching routines }
  185. {$IFC TYPED_FUNCTION_POINTERS}
  186.     CMBitmapCallBackProcPtr = FUNCTION(progress: LONGINT; refCon: UNIV Ptr): BOOLEAN;
  187. {$ELSEC}
  188.     CMBitmapCallBackProcPtr = ProcPtr;
  189. {$ENDC}
  190.  
  191. { Caller-supplied progress function for NCMMConcatInit & NCMMNewLinkProfile routines }
  192. {$IFC TYPED_FUNCTION_POINTERS}
  193.     CMConcatCallBackProcPtr = FUNCTION(progress: LONGINT; refCon: UNIV Ptr): BOOLEAN;
  194. {$ELSEC}
  195.     CMConcatCallBackProcPtr = ProcPtr;
  196. {$ENDC}
  197.  
  198. { Caller-supplied filter function for Profile search }
  199. {$IFC TYPED_FUNCTION_POINTERS}
  200.     CMProfileFilterProcPtr = FUNCTION(prof: CMProfileRef; refCon: UNIV Ptr): BOOLEAN;
  201. {$ELSEC}
  202.     CMProfileFilterProcPtr = ProcPtr;
  203. {$ENDC}
  204.  
  205. { Caller-supplied function for profile access }
  206. {$IFC TYPED_FUNCTION_POINTERS}
  207.     CMProfileAccessProcPtr = FUNCTION(command: LONGINT; offset: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr): OSErr;
  208. {$ELSEC}
  209.     CMProfileAccessProcPtr = ProcPtr;
  210. {$ENDC}
  211.  
  212.     CMFlattenUPP = UniversalProcPtr;
  213.     CMBitmapCallBackUPP = UniversalProcPtr;
  214.     CMConcatCallBackUPP = UniversalProcPtr;
  215.     CMProfileFilterUPP = UniversalProcPtr;
  216.     CMProfileAccessUPP = UniversalProcPtr;
  217.  
  218. CONST
  219.     uppCMFlattenProcInfo = $00003FE0;
  220.     uppCMBitmapCallBackProcInfo = $000003D0;
  221.     uppCMConcatCallBackProcInfo = $000003D0;
  222.     uppCMProfileFilterProcInfo = $000003D0;
  223.     uppCMProfileAccessProcInfo = $0000FFE0;
  224.  
  225. FUNCTION NewCMFlattenProc(userRoutine: CMFlattenProcPtr): CMFlattenUPP;
  226.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  227.     INLINE $2E9F;
  228.     {$ENDC}
  229.  
  230. FUNCTION NewCMBitmapCallBackProc(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP;
  231.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  232.     INLINE $2E9F;
  233.     {$ENDC}
  234.  
  235. FUNCTION NewCMConcatCallBackProc(userRoutine: CMConcatCallBackProcPtr): CMConcatCallBackUPP;
  236.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  237.     INLINE $2E9F;
  238.     {$ENDC}
  239.  
  240. FUNCTION NewCMProfileFilterProc(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP;
  241.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  242.     INLINE $2E9F;
  243.     {$ENDC}
  244.  
  245. FUNCTION NewCMProfileAccessProc(userRoutine: CMProfileAccessProcPtr): CMProfileAccessUPP;
  246.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  247.     INLINE $2E9F;
  248.     {$ENDC}
  249.  
  250. FUNCTION CallCMFlattenProc(command: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr; userRoutine: CMFlattenUPP): OSErr;
  251.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  252.     INLINE $205F, $4E90;
  253.     {$ENDC}
  254.  
  255. FUNCTION CallCMBitmapCallBackProc(progress: LONGINT; refCon: UNIV Ptr; userRoutine: CMBitmapCallBackUPP): BOOLEAN;
  256.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  257.     INLINE $205F, $4E90;
  258.     {$ENDC}
  259.  
  260. FUNCTION CallCMConcatCallBackProc(progress: LONGINT; refCon: UNIV Ptr; userRoutine: CMConcatCallBackUPP): BOOLEAN;
  261.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  262.     INLINE $205F, $4E90;
  263.     {$ENDC}
  264.  
  265. FUNCTION CallCMProfileFilterProc(prof: CMProfileRef; refCon: UNIV Ptr; userRoutine: CMProfileFilterUPP): BOOLEAN;
  266.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  267.     INLINE $205F, $4E90;
  268.     {$ENDC}
  269.  
  270. FUNCTION CallCMProfileAccessProc(command: LONGINT; offset: LONGINT; VAR size: LONGINT; data: UNIV Ptr; refCon: UNIV Ptr; userRoutine: CMProfileAccessUPP): OSErr;
  271.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  272.     INLINE $205F, $4E90;
  273.     {$ENDC}
  274.  
  275. TYPE
  276.     CMError                                = LONGINT;
  277. { For 1.0 and 2.0 profile header variants }
  278. { CMAppleProfileHeader }
  279.     CMAppleProfileHeaderPtr = ^CMAppleProfileHeader;
  280.     CMAppleProfileHeader = RECORD
  281.         CASE INTEGER OF
  282.         0: (
  283.             cm1:                CMHeader;
  284.             );
  285.         1: (
  286.             cm2:                CM2Header;
  287.             );
  288.     END;
  289.  
  290. { Param for CWConcatColorWorld(…) }
  291.     CMConcatProfileSetPtr = ^CMConcatProfileSet;
  292.     CMConcatProfileSet = RECORD
  293.         keyIndex:                UInt16;                                    {  Zero-based  }
  294.         count:                    UInt16;                                    {  Min 1  }
  295.         profileSet:                ARRAY [0..0] OF CMProfileRef;            {  Variable. Ordered from Source -> Dest  }
  296.     END;
  297.  
  298.  
  299. { NCMConcatProfileSpec Tags }
  300.  
  301. CONST
  302.     kNoTransform                = 0;                            {  Not used  }
  303.     kUseAtoB                    = 1;                            {  Use 'A2B*' tag from this profile or equivalent  }
  304.     kUseBtoA                    = 2;                            {  Use 'B2A*' tag from this profile or equivalent  }
  305.     kUseBtoB                    = 3;                            {  Use 'pre*' tag from this profile or equivalent  }
  306.                                                                 {  For typical device profiles the following synonyms may be useful  }
  307.     kDeviceToPCS                = 1;                            {  Device Dependent to Device Independent  }
  308.     kPCSToDevice                = 2;                            {  Device Independent to Device Dependent  }
  309.     kPCSToPCS                    = 3;                            {  Independent, through device's gamut  }
  310.     kUseProfileIntent            = $FFFFFFFF;                    {  For renderingIntent in NCMConcatProfileSpec     }
  311.  
  312. { NCMConcatProfileSpec }
  313.  
  314. TYPE
  315.     NCMConcatProfileSpecPtr = ^NCMConcatProfileSpec;
  316.     NCMConcatProfileSpec = RECORD
  317.         renderingIntent:        UInt32;                                    {  renderingIntent override         }
  318.         transformTag:            UInt32;                                    {  transformTag, defined above     }
  319.         profile:                CMProfileRef;                            {  profile  }
  320.     END;
  321.  
  322. { NCMConcatProfileSet }
  323.     NCMConcatProfileSetPtr = ^NCMConcatProfileSet;
  324.     NCMConcatProfileSet = RECORD
  325.         cmm:                    OSType;                                    {  e.g. 'KCMS', 'appl', ...  uniquely ids the cmm, or 0000  }
  326.         flags:                    UInt32;                                    {  specify quality, lookup only, no gamut checking ...  }
  327.         flagsMask:                UInt32;                                    {  which bits of 'flags' to use to override profile  }
  328.         profileCount:            UInt32;                                    {  how many ProfileSpecs in the following set  }
  329.         profileSpecs:            ARRAY [0..0] OF NCMConcatProfileSpec;    {  Variable. Ordered from Source -> Dest  }
  330.     END;
  331.  
  332. { ColorSync color data types }
  333.     CMRGBColorPtr = ^CMRGBColor;
  334.     CMRGBColor = RECORD
  335.         red:                    UInt16;                                    {  0..65535  }
  336.         green:                    UInt16;
  337.         blue:                    UInt16;
  338.     END;
  339.  
  340.     CMCMYKColorPtr = ^CMCMYKColor;
  341.     CMCMYKColor = RECORD
  342.         cyan:                    UInt16;                                    {  0..65535  }
  343.         magenta:                UInt16;
  344.         yellow:                    UInt16;
  345.         black:                    UInt16;
  346.     END;
  347.  
  348.     CMCMYColorPtr = ^CMCMYColor;
  349.     CMCMYColor = RECORD
  350.         cyan:                    UInt16;                                    {  0..65535  }
  351.         magenta:                UInt16;
  352.         yellow:                    UInt16;
  353.     END;
  354.  
  355.     CMHLSColorPtr = ^CMHLSColor;
  356.     CMHLSColor = RECORD
  357.         hue:                    UInt16;                                    {  0..65535. Fraction of circle. Red at 0  }
  358.         lightness:                UInt16;                                    {  0..65535  }
  359.         saturation:                UInt16;                                    {  0..65535  }
  360.     END;
  361.  
  362.     CMHSVColorPtr = ^CMHSVColor;
  363.     CMHSVColor = RECORD
  364.         hue:                    UInt16;                                    {  0..65535. Fraction of circle. Red at 0  }
  365.         saturation:                UInt16;                                    {  0..65535  }
  366.         value:                    UInt16;                                    {  0..65535  }
  367.     END;
  368.  
  369.     CMLabColorPtr = ^CMLabColor;
  370.     CMLabColor = RECORD
  371.         L:                        UInt16;                                    {  0..65535 maps to 0..100  }
  372.         a:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  373.         b:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  374.     END;
  375.  
  376.     CMLuvColorPtr = ^CMLuvColor;
  377.     CMLuvColor = RECORD
  378.         L:                        UInt16;                                    {  0..65535 maps to 0..100  }
  379.         u:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  380.         v:                        UInt16;                                    {  0..65535 maps to -128..127.996  }
  381.     END;
  382.  
  383.     CMYxyColorPtr = ^CMYxyColor;
  384.     CMYxyColor = RECORD
  385.         capY:                    UInt16;                                    {  0..65535 maps to 0..1  }
  386.         x:                        UInt16;                                    {  0..65535 maps to 0..1  }
  387.         y:                        UInt16;                                    {  0..65535 maps to 0..1  }
  388.     END;
  389.  
  390.     CMGrayColorPtr = ^CMGrayColor;
  391.     CMGrayColor = RECORD
  392.         gray:                    UInt16;                                    {  0..65535  }
  393.     END;
  394.  
  395.     CMMultichannel5ColorPtr = ^CMMultichannel5Color;
  396.     CMMultichannel5Color = RECORD
  397.         components:                PACKED ARRAY [0..4] OF UInt8;            {  0..255  }
  398.     END;
  399.  
  400.     CMMultichannel6ColorPtr = ^CMMultichannel6Color;
  401.     CMMultichannel6Color = RECORD
  402.         components:                PACKED ARRAY [0..5] OF UInt8;            {  0..255  }
  403.     END;
  404.  
  405.     CMMultichannel7ColorPtr = ^CMMultichannel7Color;
  406.     CMMultichannel7Color = RECORD
  407.         components:                PACKED ARRAY [0..6] OF UInt8;            {  0..255  }
  408.     END;
  409.  
  410.     CMMultichannel8ColorPtr = ^CMMultichannel8Color;
  411.     CMMultichannel8Color = RECORD
  412.         components:                PACKED ARRAY [0..7] OF UInt8;            {  0..255  }
  413.     END;
  414.  
  415.     CMNamedColorPtr = ^CMNamedColor;
  416.     CMNamedColor = RECORD
  417.         namedColorIndex:        UInt32;                                    {  0..a lot  }
  418.     END;
  419.  
  420.     CMColorPtr = ^CMColor;
  421.     CMColor = RECORD
  422.         CASE INTEGER OF
  423.         0: (
  424.             rgb:                CMRGBColor;
  425.             );
  426.         1: (
  427.             hsv:                CMHSVColor;
  428.             );
  429.         2: (
  430.             hls:                CMHLSColor;
  431.             );
  432.         3: (
  433.             XYZ:                CMXYZColor;
  434.             );
  435.         4: (
  436.             Lab:                CMLabColor;
  437.             );
  438.         5: (
  439.             Luv:                CMLuvColor;
  440.             );
  441.         6: (
  442.             Yxy:                CMYxyColor;
  443.             );
  444.         7: (
  445.             cmyk:                CMCMYKColor;
  446.             );
  447.         8: (
  448.             cmy:                CMCMYColor;
  449.             );
  450.         9: (
  451.             gray:                CMGrayColor;
  452.             );
  453.         10: (
  454.             mc5:                CMMultichannel5Color;
  455.             );
  456.         11: (
  457.             mc6:                CMMultichannel6Color;
  458.             );
  459.         12: (
  460.             mc7:                CMMultichannel7Color;
  461.             );
  462.         13: (
  463.             mc8:                CMMultichannel8Color;
  464.             );
  465.         14: (
  466.             namedColor:            CMNamedColor;
  467.             );
  468.     END;
  469.  
  470.     CMProfileSearchRecordPtr = ^CMProfileSearchRecord;
  471.     CMProfileSearchRecord = RECORD
  472.         header:                    CMHeader;
  473.         fieldMask:                UInt32;
  474.         reserved:                ARRAY [0..1] OF UInt32;
  475.     END;
  476.  
  477.     CMProfileSearchRecordHandle            = ^CMProfileSearchRecordPtr;
  478. { Search definition for 2.0 }
  479.     CMSearchRecordPtr = ^CMSearchRecord;
  480.     CMSearchRecord = RECORD
  481.         CMMType:                OSType;
  482.         profileClass:            OSType;
  483.         dataColorSpace:            OSType;
  484.         profileConnectionSpace:    OSType;
  485.         deviceManufacturer:        UInt32;
  486.         deviceModel:            UInt32;
  487.         deviceAttributes:        ARRAY [0..1] OF UInt32;
  488.         profileFlags:            UInt32;
  489.         searchMask:                UInt32;
  490.         filter:                    CMProfileFilterUPP;
  491.     END;
  492.  
  493. { CMMInfo structure }
  494.     CMMInfoPtr = ^CMMInfo;
  495.     CMMInfo = RECORD
  496.         dataSize:                UInt32;                                    {  Size of this structure - compatibility }
  497.         CMMType:                OSType;                                    {  Signature, e.g. 'KCMS' }
  498.         CMMMfr:                    OSType;                                    {  Vendor, e.g. 'appl' }
  499.         CMMVersion:                UInt32;                                    {  cmm version number }
  500.         ASCIIName:                PACKED ARRAY [0..31] OF UInt8;            {  pascal string - name }
  501.         ASCIIDesc:                PACKED ARRAY [0..255] OF UInt8;            {  pascal string - description or copyright }
  502.         UniCodeNameCount:        UniCharCount;                            {  count of UniChars in following array }
  503.         UniCodeName:            ARRAY [0..31] OF UniChar;                {  the name in UniCode chars }
  504.         UniCodeDescCount:        UniCharCount;                            {  count of UniChars in following array }
  505.         UniCodeDesc:            ARRAY [0..255] OF UniChar;                {  the description in UniCode chars }
  506.     END;
  507.  
  508. { GetCWInfo structures }
  509.     CMMInfoRecordPtr = ^CMMInfoRecord;
  510.     CMMInfoRecord = RECORD
  511.         CMMType:                OSType;
  512.         CMMVersion:                LONGINT;
  513.     END;
  514.  
  515.     CMCWInfoRecordPtr = ^CMCWInfoRecord;
  516.     CMCWInfoRecord = RECORD
  517.         cmmCount:                UInt32;
  518.         cmmInfo:                ARRAY [0..1] OF CMMInfoRecord;
  519.     END;
  520.  
  521. { profile identifier structures }
  522.     CMProfileIdentifierPtr = ^CMProfileIdentifier;
  523.     CMProfileIdentifier = RECORD
  524.         profileHeader:            CM2Header;
  525.         calibrationDate:        CMDateTime;
  526.         ASCIIProfileDescriptionLen: UInt32;
  527.         ASCIIProfileDescription: SInt8;                                    {  variable length  }
  528.     END;
  529.  
  530. { packing formats }
  531.  
  532. CONST
  533.     cmNoColorPacking            = $0000;
  534.     cmWord5ColorPacking            = $0500;
  535.     cmWord565ColorPacking        = $0600;
  536.     cmLong8ColorPacking            = $0800;
  537.     cmLong10ColorPacking        = $0A00;
  538.     cmAlphaFirstPacking            = $1000;
  539.     cmOneBitDirectPacking        = $0B00;
  540.     cmAlphaLastPacking            = $0000;
  541.     cm8_8ColorPacking            = $2800;
  542.     cm16_8ColorPacking            = $2000;
  543.     cm24_8ColorPacking            = $2100;
  544.     cm32_8ColorPacking            = $0800;
  545.     cm40_8ColorPacking            = $2200;
  546.     cm48_8ColorPacking            = $2300;
  547.     cm56_8ColorPacking            = $2400;
  548.     cm64_8ColorPacking            = $2500;
  549.     cm32_16ColorPacking            = $2600;
  550.     cm48_16ColorPacking            = $2900;
  551.     cm64_16ColorPacking            = $2A00;
  552.     cm32_32ColorPacking            = $2700;
  553.     cmLittleEndianPacking        = $4000;
  554.     cmReverseChannelPacking        = $8000;
  555.  
  556. { general colorspaces }
  557.     cmNoSpace                    = 0;
  558.     cmRGBSpace                    = 1;
  559.     cmCMYKSpace                    = 2;
  560.     cmHSVSpace                    = 3;
  561.     cmHLSSpace                    = 4;
  562.     cmYXYSpace                    = 5;
  563.     cmXYZSpace                    = 6;
  564.     cmLUVSpace                    = 7;
  565.     cmLABSpace                    = 8;
  566.     cmReservedSpace1            = 9;
  567.     cmGraySpace                    = 10;
  568.     cmReservedSpace2            = 11;
  569.     cmGamutResultSpace            = 12;
  570.     cmNamedIndexedSpace            = 16;
  571.     cmMCFiveSpace                = 17;
  572.     cmMCSixSpace                = 18;
  573.     cmMCSevenSpace                = 19;
  574.     cmMCEightSpace                = 20;
  575.     cmAlphaSpace                = $80;
  576.     cmRGBASpace                    = 129;
  577.     cmGrayASpace                = 138;
  578.  
  579. { supported CMBitmapColorSpaces - Each of the following is a }
  580. { combination of a general colospace and a packing formats. }
  581. { Each can also be or'd with cmReverseChannelPacking. }
  582.     cmGray8Space                = 10250;
  583.     cmGrayA16Space                = 8330;
  584.     cmGray16Space                = 10;
  585.     cmGrayA32Space                = 138;
  586.     cmGray16LSpace                = 16394;
  587.     cmGrayA32LSpace                = 16522;
  588.     cmRGB16Space                = 1281;
  589.     cmRGB16LSpace                = 17665;
  590.     cmRGB565Space                = 1537;
  591.     cmRGB565LSpace                = 17921;
  592.     cmRGB24Space                = 8449;
  593.     cmRGB32Space                = 2049;
  594.     cmRGB48Space                = 10497;
  595.     cmRGB48LSpace                = 26881;
  596.     cmARGB32Space                = 6273;
  597.     cmARGB64Space                = 14977;
  598.     cmARGB64LSpace                = 31361;
  599.     cmRGBA32Space                = 2177;
  600.     cmRGBA64Space                = 10881;
  601.     cmRGBA64LSpace                = 27265;
  602.     cmCMYK32Space                = 2050;
  603.     cmCMYK64Space                = 10754;
  604.     cmCMYK64LSpace                = 27138;
  605.     cmHSV32Space                = 2563;
  606.     cmHLS32Space                = 2564;
  607.     cmYXY32Space                = 2565;
  608.     cmXYZ24Space                = 8454;
  609.     cmXYZ32Space                = 2566;
  610.     cmXYZ48Space                = 10502;
  611.     cmXYZ48LSpace                = 26886;
  612.     cmLUV32Space                = 2567;
  613.     cmLAB24Space                = 8456;
  614.     cmLAB32Space                = 2568;
  615.     cmLAB48Space                = 10504;
  616.     cmLAB48LSpace                = 26888;
  617.     cmGamutResult1Space            = $0B0C;
  618.     cmNamedIndexed32Space        = $2710;
  619.     cmNamedIndexed32LSpace        = $6710;
  620.     cmMCFive8Space                = $2211;
  621.     cmMCSix8Space                = $2312;
  622.     cmMCSeven8Space                = $2413;
  623.     cmMCEight8Space                = $2514;
  624.  
  625.  
  626.  
  627. TYPE
  628.     CMBitmapColorSpace                    = UInt32;
  629.     CMBitmapPtr = ^CMBitmap;
  630.     CMBitmap = RECORD
  631.         image:                    CStringPtr;
  632.         width:                    LONGINT;
  633.         height:                    LONGINT;
  634.         rowBytes:                LONGINT;
  635.         pixelSize:                LONGINT;
  636.         space:                    CMBitmapColorSpace;
  637.         user1:                    LONGINT;
  638.         user2:                    LONGINT;
  639.     END;
  640.  
  641.  
  642. { Classic Print Manager Stuff }
  643. {$IFC TARGET_OS_MAC }
  644.  
  645. CONST
  646.     enableColorMatchingOp        = 12;
  647.     registerProfileOp            = 13;
  648.  
  649. {$ENDC}  {TARGET_OS_MAC}
  650.  
  651. { Profile Locations }
  652.  
  653. CONST
  654.     CS_MAX_PATH                    = 256;
  655.  
  656.     cmNoProfileBase                = 0;
  657.     cmFileBasedProfile            = 1;
  658.     cmHandleBasedProfile        = 2;
  659.     cmPtrBasedProfile            = 3;
  660.     cmProcedureBasedProfile        = 4;
  661.     cmPathBasedProfile            = 5;
  662.     cmBufferBasedProfile        = 6;
  663.  
  664.  
  665. TYPE
  666.     CMFileLocationPtr = ^CMFileLocation;
  667.     CMFileLocation = RECORD
  668.         spec:                    FSSpec;
  669.     END;
  670.  
  671.     CMHandleLocationPtr = ^CMHandleLocation;
  672.     CMHandleLocation = RECORD
  673.         h:                        Handle;
  674.     END;
  675.  
  676.     CMPtrLocationPtr = ^CMPtrLocation;
  677.     CMPtrLocation = RECORD
  678.         p:                        Ptr;
  679.     END;
  680.  
  681.     CMProcedureLocationPtr = ^CMProcedureLocation;
  682.     CMProcedureLocation = RECORD
  683.         proc:                    CMProfileAccessUPP;
  684.         refCon:                    Ptr;
  685.     END;
  686.  
  687.     CMPathLocationPtr = ^CMPathLocation;
  688.     CMPathLocation = RECORD
  689.         path:                    PACKED ARRAY [0..255] OF CHAR;
  690.     END;
  691.  
  692.     CMBufferLocationPtr = ^CMBufferLocation;
  693.     CMBufferLocation = RECORD
  694.         buffer:                    Ptr;
  695.         size:                    UInt32;
  696.     END;
  697.  
  698.     CMProfLocPtr = ^CMProfLoc;
  699.     CMProfLoc = RECORD
  700.         CASE INTEGER OF
  701.         0: (
  702.             fileLoc:            CMFileLocation;
  703.             );
  704.         1: (
  705.             handleLoc:            CMHandleLocation;
  706.             );
  707.         2: (
  708.             ptrLoc:                CMPtrLocation;
  709.             );
  710.         3: (
  711.             procLoc:            CMProcedureLocation;
  712.             );
  713.         4: (
  714.             pathLoc:            CMPathLocation;
  715.             );
  716.         5: (
  717.             bufferLoc:            CMBufferLocation;
  718.             );
  719.     END;
  720.  
  721.     CMProfileLocationPtr = ^CMProfileLocation;
  722.     CMProfileLocation = RECORD
  723.         locType:                INTEGER;
  724.         u:                        CMProfLoc;
  725.     END;
  726.  
  727. {$IFC TARGET_OS_MAC }
  728.  
  729. CONST
  730.     cmOriginalProfileLocationSize = 72;
  731.     cmCurrentProfileLocationSize = 258;
  732.  
  733. {$ELSEC}
  734.  
  735. CONST
  736.     cmOriginalProfileLocationSize = 258;
  737.     cmCurrentProfileLocationSize = 258;
  738.  
  739. {$ENDC}  {TARGET_OS_MAC}
  740.  
  741. { Struct and enums used for Profile iteration }
  742.     cmProfileIterateDataVersion1 = $00010000;
  743.     cmProfileIterateDataVersion2 = $00020000;
  744.  
  745.  
  746. TYPE
  747.     CMProfileIterateDataPtr = ^CMProfileIterateData;
  748.     CMProfileIterateData = RECORD
  749.         dataVersion:            UInt32;                                    {  cmProfileIterateDataVersion2  }
  750.         header:                    CM2Header;
  751.         code:                    ScriptCode;
  752.         name:                    Str255;
  753.         location:                CMProfileLocation;
  754.         uniCodeNameCount:        UniCharCount;
  755.         uniCodeName:            UniCharPtr;
  756.         asciiName:                Ptr;
  757.         makeAndModel:            CMMakeAndModelPtr;
  758.     END;
  759.  
  760. { Caller-supplied callback function for Profile & CMM iteration }
  761. {$IFC TYPED_FUNCTION_POINTERS}
  762.     CMProfileIterateProcPtr = FUNCTION(VAR iterateData: CMProfileIterateData; refCon: UNIV Ptr): OSErr;
  763. {$ELSEC}
  764.     CMProfileIterateProcPtr = ProcPtr;
  765. {$ENDC}
  766.  
  767. {$IFC TYPED_FUNCTION_POINTERS}
  768.     CMMIterateProcPtr = FUNCTION(VAR iterateData: CMMInfo; refCon: UNIV Ptr): OSErr;
  769. {$ELSEC}
  770.     CMMIterateProcPtr = ProcPtr;
  771. {$ENDC}
  772.  
  773.     CMProfileIterateUPP = UniversalProcPtr;
  774.     CMMIterateUPP = UniversalProcPtr;
  775.  
  776. CONST
  777.     uppCMProfileIterateProcInfo = $000003E0;
  778.     uppCMMIterateProcInfo = $000003E0;
  779.  
  780. FUNCTION NewCMProfileIterateProc(userRoutine: CMProfileIterateProcPtr): CMProfileIterateUPP;
  781.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  782.     INLINE $2E9F;
  783.     {$ENDC}
  784.  
  785. FUNCTION NewCMMIterateProc(userRoutine: CMMIterateProcPtr): CMMIterateUPP;
  786.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  787.     INLINE $2E9F;
  788.     {$ENDC}
  789.  
  790. FUNCTION CallCMProfileIterateProc(VAR iterateData: CMProfileIterateData; refCon: UNIV Ptr; userRoutine: CMProfileIterateUPP): OSErr;
  791.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  792.     INLINE $205F, $4E90;
  793.     {$ENDC}
  794.  
  795. FUNCTION CallCMMIterateProc(VAR iterateData: CMMInfo; refCon: UNIV Ptr; userRoutine: CMMIterateUPP): OSErr;
  796.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  797.     INLINE $205F, $4E90;
  798.     {$ENDC}
  799. { Profile file and element access }
  800. FUNCTION CMNewProfile(VAR prof: CMProfileRef; {CONST}VAR theProfile: CMProfileLocation): CMError;
  801.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  802.     INLINE $203C, $0008, $001B, $ABEE;
  803.     {$ENDC}
  804. FUNCTION CMOpenProfile(VAR prof: CMProfileRef; {CONST}VAR theProfile: CMProfileLocation): CMError;
  805.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  806.     INLINE $203C, $0008, $001C, $ABEE;
  807.     {$ENDC}
  808. FUNCTION CMCloseProfile(prof: CMProfileRef): CMError;
  809.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  810.     INLINE $203C, $0004, $001D, $ABEE;
  811.     {$ENDC}
  812. FUNCTION CMUpdateProfile(prof: CMProfileRef): CMError;
  813.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  814.     INLINE $203C, $0004, $0034, $ABEE;
  815.     {$ENDC}
  816. FUNCTION CMCopyProfile(VAR targetProf: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; srcProf: CMProfileRef): CMError;
  817.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  818.     INLINE $203C, $000C, $0025, $ABEE;
  819.     {$ENDC}
  820. FUNCTION CMValidateProfile(prof: CMProfileRef; VAR valid: BOOLEAN; VAR preferredCMMnotfound: BOOLEAN): CMError;
  821.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  822.     INLINE $203C, $000C, $0026, $ABEE;
  823.     {$ENDC}
  824. FUNCTION CMGetProfileLocation(prof: CMProfileRef; VAR theProfile: CMProfileLocation): CMError;
  825.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  826.     INLINE $203C, $0008, $003C, $ABEE;
  827.     {$ENDC}
  828. FUNCTION NCMGetProfileLocation(prof: CMProfileRef; VAR theProfile: CMProfileLocation; VAR locationSize: UInt32): CMError;
  829.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  830.     INLINE $203C, $000C, $0059, $ABEE;
  831.     {$ENDC}
  832. FUNCTION CMFlattenProfile(prof: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  833.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  834.     INLINE $203C, $0014, $0031, $ABEE;
  835.     {$ENDC}
  836. {$IFC TARGET_OS_MAC }
  837. FUNCTION CMUnflattenProfile(VAR resultFileSpec: FSSpec; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  838.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  839.     INLINE $203C, $0010, $0032, $ABEE;
  840.     {$ENDC}
  841. {$ENDC}  {TARGET_OS_MAC}
  842.  
  843. FUNCTION CMGetProfileHeader(prof: CMProfileRef; VAR header: CMAppleProfileHeader): CMError;
  844.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  845.     INLINE $203C, $0008, $0039, $ABEE;
  846.     {$ENDC}
  847. FUNCTION CMSetProfileHeader(prof: CMProfileRef; {CONST}VAR header: CMAppleProfileHeader): CMError;
  848.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  849.     INLINE $203C, $0008, $003A, $ABEE;
  850.     {$ENDC}
  851. FUNCTION CMProfileElementExists(prof: CMProfileRef; tag: OSType; VAR found: BOOLEAN): CMError;
  852.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  853.     INLINE $203C, $000C, $001E, $ABEE;
  854.     {$ENDC}
  855. FUNCTION CMCountProfileElements(prof: CMProfileRef; VAR elementCount: UInt32): CMError;
  856.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  857.     INLINE $203C, $0008, $001F, $ABEE;
  858.     {$ENDC}
  859. FUNCTION CMGetProfileElement(prof: CMProfileRef; tag: OSType; VAR elementSize: UInt32; elementData: UNIV Ptr): CMError;
  860.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  861.     INLINE $203C, $0010, $0020, $ABEE;
  862.     {$ENDC}
  863. FUNCTION CMSetProfileElement(prof: CMProfileRef; tag: OSType; elementSize: UInt32; elementData: UNIV Ptr): CMError;
  864.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  865.     INLINE $203C, $0010, $0023, $ABEE;
  866.     {$ENDC}
  867. FUNCTION CMSetProfileElementSize(prof: CMProfileRef; tag: OSType; elementSize: UInt32): CMError;
  868.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  869.     INLINE $203C, $000C, $0038, $ABEE;
  870.     {$ENDC}
  871. FUNCTION CMSetProfileElementReference(prof: CMProfileRef; elementTag: OSType; referenceTag: OSType): CMError;
  872.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  873.     INLINE $203C, $000C, $0035, $ABEE;
  874.     {$ENDC}
  875. FUNCTION CMGetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; VAR byteCount: UInt32; elementData: UNIV Ptr): CMError;
  876.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  877.     INLINE $203C, $0014, $0036, $ABEE;
  878.     {$ENDC}
  879. FUNCTION CMSetPartialProfileElement(prof: CMProfileRef; tag: OSType; offset: UInt32; byteCount: UInt32; elementData: UNIV Ptr): CMError;
  880.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  881.     INLINE $203C, $0014, $0037, $ABEE;
  882.     {$ENDC}
  883. FUNCTION CMGetIndProfileElementInfo(prof: CMProfileRef; index: UInt32; VAR tag: OSType; VAR elementSize: UInt32; VAR refs: BOOLEAN): CMError;
  884.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  885.     INLINE $203C, $0014, $0021, $ABEE;
  886.     {$ENDC}
  887. FUNCTION CMGetIndProfileElement(prof: CMProfileRef; index: UInt32; VAR elementSize: UInt32; elementData: UNIV Ptr): CMError;
  888.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  889.     INLINE $203C, $0010, $0022, $ABEE;
  890.     {$ENDC}
  891. FUNCTION CMRemoveProfileElement(prof: CMProfileRef; tag: OSType): CMError;
  892.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  893.     INLINE $203C, $0008, $0024, $ABEE;
  894.     {$ENDC}
  895. FUNCTION CMGetScriptProfileDescription(prof: CMProfileRef; VAR name: Str255; VAR code: ScriptCode): CMError;
  896.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  897.     INLINE $203C, $000C, $003E, $ABEE;
  898.     {$ENDC}
  899. FUNCTION CMGetProfileDescriptions(prof: CMProfileRef; aName: CStringPtr; VAR aCount: UInt32; VAR mName: Str255; VAR mCode: ScriptCode; VAR uName: UniChar; VAR uCount: UniCharCount): CMError;
  900.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  901.     INLINE $203C, $001A, $0067, $ABEE;
  902.     {$ENDC}
  903. FUNCTION CMSetProfileDescriptions(prof: CMProfileRef; aName: ConstCStringPtr; aCount: UInt32; mName: Str255; mCode: ScriptCode; {CONST}VAR uName: UniChar; uCount: UniCharCount): CMError;
  904.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  905.     INLINE $203C, $001A, $0068, $ABEE;
  906.     {$ENDC}
  907. FUNCTION CMCloneProfileRef(prof: CMProfileRef): CMError;
  908.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  909.     INLINE $203C, $0004, $0042, $ABEE;
  910.     {$ENDC}
  911. FUNCTION CMGetProfileRefCount(prof: CMProfileRef; VAR count: LONGINT): CMError;
  912.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  913.     INLINE $203C, $0008, $0043, $ABEE;
  914.     {$ENDC}
  915. FUNCTION CMProfileModified(prof: CMProfileRef; VAR modified: BOOLEAN): CMError;
  916.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  917.     INLINE $203C, $0008, $0044, $ABEE;
  918.     {$ENDC}
  919.  
  920. { named Color access functions }
  921. FUNCTION CMGetNamedColorInfo(prof: CMProfileRef; VAR deviceChannels: UInt32; VAR deviceColorSpace: OSType; VAR PCSColorSpace: OSType; VAR count: UInt32; prefix: StringPtr; suffix: StringPtr): CMError;
  922.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  923.     INLINE $203C, $001C, $0046, $ABEE;
  924.     {$ENDC}
  925. FUNCTION CMGetNamedColorValue(prof: CMProfileRef; name: StringPtr; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  926.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  927.     INLINE $203C, $0010, $0047, $ABEE;
  928.     {$ENDC}
  929. FUNCTION CMGetIndNamedColorValue(prof: CMProfileRef; index: UInt32; VAR deviceColor: CMColor; VAR PCSColor: CMColor): CMError;
  930.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  931.     INLINE $203C, $0010, $0048, $ABEE;
  932.     {$ENDC}
  933. FUNCTION CMGetNamedColorIndex(prof: CMProfileRef; name: StringPtr; VAR index: UInt32): CMError;
  934.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  935.     INLINE $203C, $000C, $0049, $ABEE;
  936.     {$ENDC}
  937. FUNCTION CMGetNamedColorName(prof: CMProfileRef; index: UInt32; name: StringPtr): CMError;
  938.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  939.     INLINE $203C, $000C, $004A, $ABEE;
  940.     {$ENDC}
  941.  
  942. { General-purpose matching functions }
  943. FUNCTION NCWNewColorWorld(VAR cw: CMWorldRef; src: CMProfileRef; dst: CMProfileRef): CMError;
  944.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  945.     INLINE $203C, $000C, $0014, $ABEE;
  946.     {$ENDC}
  947. FUNCTION CWConcatColorWorld(VAR cw: CMWorldRef; VAR profileSet: CMConcatProfileSet): CMError;
  948.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  949.     INLINE $203C, $0008, $0015, $ABEE;
  950.     {$ENDC}
  951. FUNCTION CWNewLinkProfile(VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: CMConcatProfileSet): CMError;
  952.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  953.     INLINE $203C, $000C, $0033, $ABEE;
  954.     {$ENDC}
  955. FUNCTION NCWConcatColorWorld(VAR cw: CMWorldRef; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  956.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  957.     INLINE $203C, $0008, $0061, $ABEE;
  958.     {$ENDC}
  959. FUNCTION NCWNewLinkProfile(VAR prof: CMProfileRef; {CONST}VAR targetLocation: CMProfileLocation; VAR profileSet: NCMConcatProfileSet; proc: CMConcatCallBackUPP; refCon: UNIV Ptr): CMError;
  960.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  961.     INLINE $203C, $000C, $0062, $ABEE;
  962.     {$ENDC}
  963. PROCEDURE CWDisposeColorWorld(cw: CMWorldRef);
  964.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  965.     INLINE $203C, $0004, $0001, $ABEE;
  966.     {$ENDC}
  967. FUNCTION CWMatchColors(cw: CMWorldRef; VAR myColors: CMColor; count: UInt32): CMError;
  968.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  969.     INLINE $203C, $000C, $0002, $ABEE;
  970.     {$ENDC}
  971. FUNCTION CWCheckColors(cw: CMWorldRef; VAR myColors: CMColor; count: UInt32; VAR result: UInt32): CMError;
  972.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  973.     INLINE $203C, $0010, $0003, $ABEE;
  974.     {$ENDC}
  975. FUNCTION CWMatchBitmap(cw: CMWorldRef; VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR matchedBitmap: CMBitmap): CMError;
  976.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  977.     INLINE $203C, $0010, $002C, $ABEE;
  978.     {$ENDC}
  979. FUNCTION CWCheckBitmap(cw: CMWorldRef; {CONST}VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitmap: CMBitmap): CMError;
  980.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  981.     INLINE $203C, $0014, $002D, $ABEE;
  982.     {$ENDC}
  983.  
  984. { Quickdraw-specific matching }
  985. FUNCTION CWMatchPixMap(cw: CMWorldRef; VAR myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  986.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  987.     INLINE $203C, $0010, $0004, $ABEE;
  988.     {$ENDC}
  989. FUNCTION CWCheckPixMap(cw: CMWorldRef; VAR myPixMap: PixMap; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr; VAR resultBitMap: BitMap): CMError;
  990.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  991.     INLINE $203C, $0014, $0007, $ABEE;
  992.     {$ENDC}
  993. {$IFC TARGET_OS_MAC }
  994. FUNCTION NCMBeginMatching(src: CMProfileRef; dst: CMProfileRef; VAR myRef: CMMatchRef): CMError;
  995.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  996.     INLINE $203C, $000C, $0016, $ABEE;
  997.     {$ENDC}
  998. PROCEDURE CMEndMatching(myRef: CMMatchRef);
  999.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1000.     INLINE $203C, $0004, $000B, $ABEE;
  1001.     {$ENDC}
  1002. PROCEDURE NCMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileRef; VAR myRect: Rect);
  1003.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1004.     INLINE $203C, $000C, $0017, $ABEE;
  1005.     {$ENDC}
  1006. PROCEDURE CMEnableMatchingComment(enableIt: BOOLEAN);
  1007.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1008.     INLINE $203C, $0002, $000D, $ABEE;
  1009.     {$ENDC}
  1010. FUNCTION NCMUseProfileComment(prof: CMProfileRef; flags: UInt32): CMError;
  1011.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1012.     INLINE $203C, $0008, $003B, $ABEE;
  1013.     {$ENDC}
  1014. {$ENDC}  {TARGET_OS_MAC}
  1015.  
  1016. {$IFC TARGET_OS_WIN32 }
  1017. FUNCTION CWMatchHBITMAP(cw: CMWorldRef; hBitmap: HBITMAP; progressProc: CMBitmapCallBackUPP; refCon: UNIV Ptr): CMError;
  1018. {$ENDC}  {TARGET_OS_WIN32}
  1019.  
  1020. FUNCTION CMCreateProfileIdentifier(prof: CMProfileRef; ident: CMProfileIdentifierPtr; VAR size: UInt32): CMError;
  1021.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1022.     INLINE $203C, $000C, $0041, $ABEE;
  1023.     {$ENDC}
  1024.  
  1025. { System Profile access }
  1026. FUNCTION CMGetSystemProfile(VAR prof: CMProfileRef): CMError;
  1027.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1028.     INLINE $203C, $0004, $0018, $ABEE;
  1029.     {$ENDC}
  1030. FUNCTION CMSetSystemProfile({CONST}VAR profileFileSpec: FSSpec): CMError;
  1031.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1032.     INLINE $203C, $0004, $0019, $ABEE;
  1033.     {$ENDC}
  1034. FUNCTION NCMSetSystemProfile({CONST}VAR profLoc: CMProfileLocation): CMError;
  1035.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1036.     INLINE $203C, $0004, $0064, $ABEE;
  1037.     {$ENDC}
  1038. FUNCTION CMGetDefaultProfileBySpace(dataColorSpace: OSType; VAR prof: CMProfileRef): CMError;
  1039.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1040.     INLINE $203C, $0008, $005A, $ABEE;
  1041.     {$ENDC}
  1042. FUNCTION CMSetDefaultProfileBySpace(dataColorSpace: OSType; prof: CMProfileRef): CMError;
  1043.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1044.     INLINE $203C, $0008, $005B, $ABEE;
  1045.     {$ENDC}
  1046. {$IFC TARGET_OS_MAC }
  1047. FUNCTION CMGetProfileByAVID(theAVID: AVIDType; VAR prof: CMProfileRef): CMError;
  1048.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1049.     INLINE $203C, $0008, $005C, $ABEE;
  1050.     {$ENDC}
  1051. FUNCTION CMSetProfileByAVID(theAVID: AVIDType; prof: CMProfileRef): CMError;
  1052.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1053.     INLINE $203C, $0008, $005D, $ABEE;
  1054.     {$ENDC}
  1055. {$ENDC}  {TARGET_OS_MAC}
  1056.  
  1057. { Profile Management }
  1058. FUNCTION CMNewProfileSearch(VAR searchSpec: CMSearchRecord; refCon: UNIV Ptr; VAR count: UInt32; VAR searchResult: CMProfileSearchRef): CMError;
  1059.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1060.     INLINE $203C, $0010, $0027, $ABEE;
  1061.     {$ENDC}
  1062. FUNCTION CMUpdateProfileSearch(search: CMProfileSearchRef; refCon: UNIV Ptr; VAR count: UInt32): CMError;
  1063.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1064.     INLINE $203C, $000C, $0028, $ABEE;
  1065.     {$ENDC}
  1066. PROCEDURE CMDisposeProfileSearch(search: CMProfileSearchRef);
  1067.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1068.     INLINE $203C, $0004, $0029, $ABEE;
  1069.     {$ENDC}
  1070. FUNCTION CMSearchGetIndProfile(search: CMProfileSearchRef; index: UInt32; VAR prof: CMProfileRef): CMError;
  1071.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1072.     INLINE $203C, $000C, $002A, $ABEE;
  1073.     {$ENDC}
  1074. FUNCTION CMSearchGetIndProfileFileSpec(search: CMProfileSearchRef; index: UInt32; VAR profileFile: FSSpec): CMError;
  1075.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1076.     INLINE $203C, $000C, $002B, $ABEE;
  1077.     {$ENDC}
  1078. FUNCTION CMProfileIdentifierFolderSearch(ident: CMProfileIdentifierPtr; VAR matchedCount: UInt32; VAR searchResult: CMProfileSearchRef): CMError;
  1079.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1080.     INLINE $203C, $000C, $003F, $ABEE;
  1081.     {$ENDC}
  1082. FUNCTION CMProfileIdentifierListSearch(ident: CMProfileIdentifierPtr; VAR profileList: CMProfileRef; listSize: UInt32; VAR matchedCount: UInt32; VAR matchedList: CMProfileRef): CMError;
  1083.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1084.     INLINE $203C, $0014, $0040, $ABEE;
  1085.     {$ENDC}
  1086. FUNCTION CMIterateColorSyncFolder(proc: CMProfileIterateUPP; VAR seed: UInt32; VAR count: UInt32; refCon: UNIV Ptr): CMError;
  1087.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1088.     INLINE $203C, $0010, $0058, $ABEE;
  1089.     {$ENDC}
  1090. FUNCTION NCMUnflattenProfile(VAR targetLocation: CMProfileLocation; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1091.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1092.     INLINE $203C, $0010, $0065, $ABEE;
  1093.     {$ENDC}
  1094. { Utilities }
  1095. {$IFC TARGET_OS_MAC }
  1096. FUNCTION CMGetColorSyncFolderSpec(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError;
  1097.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1098.     INLINE $203C, $000C, $0011, $ABEE;
  1099.     {$ENDC}
  1100. {$ENDC}  {TARGET_OS_MAC}
  1101.  
  1102. {$IFC TARGET_OS_WIN32 OR TARGET_OS_UNIX }
  1103. FUNCTION CMGetColorSyncFolderPath(createFolder: BOOLEAN; lpBuffer: CStringPtr; uSize: UInt32): CMError;
  1104. {$ENDC}
  1105.  
  1106. FUNCTION CMGetCWInfo(cw: CMWorldRef; VAR info: CMCWInfoRecord): CMError;
  1107.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1108.     INLINE $203C, $0008, $001A, $ABEE;
  1109.     {$ENDC}
  1110. FUNCTION CMConvertProfile2to1(profv2: CMProfileRef; VAR profv1: CMProfileHandle): CMError;
  1111.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1112.     INLINE $203C, $0008, $0045, $ABEE;
  1113.     {$ENDC}
  1114. FUNCTION CMGetPreferredCMM(VAR cmmType: OSType; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1116.     INLINE $203C, $0008, $005E, $ABEE;
  1117.     {$ENDC}
  1118. FUNCTION CMIterateCMMInfo(proc: CMMIterateUPP; VAR count: UInt32; refCon: UNIV Ptr): CMError;
  1119.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1120.     INLINE $203C, $000C, $0063, $ABEE;
  1121.     {$ENDC}
  1122. FUNCTION CMGetColorSyncVersion(VAR version: UInt32): CMError;
  1123.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1124.     INLINE $203C, $0004, $0066, $ABEE;
  1125.     {$ENDC}
  1126. { ColorSpace conversion functions }
  1127. FUNCTION CMConvertXYZToLab({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1128.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1129.     INLINE $203C, $0010, $004B, $ABEE;
  1130.     {$ENDC}
  1131. FUNCTION CMConvertLabToXYZ({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1132.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1133.     INLINE $203C, $0010, $004C, $ABEE;
  1134.     {$ENDC}
  1135. FUNCTION CMConvertXYZToLuv({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1136.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1137.     INLINE $203C, $0010, $004D, $ABEE;
  1138.     {$ENDC}
  1139. FUNCTION CMConvertLuvToXYZ({CONST}VAR src: CMColor; {CONST}VAR white: CMXYZColor; VAR dst: CMColor; count: UInt32): CMError;
  1140.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1141.     INLINE $203C, $0010, $004E, $ABEE;
  1142.     {$ENDC}
  1143. FUNCTION CMConvertXYZToYxy({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1144.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1145.     INLINE $203C, $000C, $004F, $ABEE;
  1146.     {$ENDC}
  1147. FUNCTION CMConvertYxyToXYZ({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1148.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1149.     INLINE $203C, $000C, $0050, $ABEE;
  1150.     {$ENDC}
  1151. FUNCTION CMConvertRGBToHLS({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1152.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1153.     INLINE $203C, $000C, $0051, $ABEE;
  1154.     {$ENDC}
  1155. FUNCTION CMConvertHLSToRGB({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1156.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1157.     INLINE $203C, $000C, $0052, $ABEE;
  1158.     {$ENDC}
  1159. FUNCTION CMConvertRGBToHSV({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1161.     INLINE $203C, $000C, $0053, $ABEE;
  1162.     {$ENDC}
  1163. FUNCTION CMConvertHSVToRGB({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1164.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1165.     INLINE $203C, $000C, $0054, $ABEE;
  1166.     {$ENDC}
  1167. FUNCTION CMConvertRGBToGray({CONST}VAR src: CMColor; VAR dst: CMColor; count: UInt32): CMError;
  1168.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1169.     INLINE $203C, $000C, $0055, $ABEE;
  1170.     {$ENDC}
  1171. FUNCTION CMConvertXYZToFixedXYZ({CONST}VAR src: CMXYZColor; VAR dst: CMFixedXYZColor; count: UInt32): CMError;
  1172.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1173.     INLINE $203C, $000C, $0056, $ABEE;
  1174.     {$ENDC}
  1175. FUNCTION CMConvertFixedXYZToXYZ({CONST}VAR src: CMFixedXYZColor; VAR dst: CMXYZColor; count: UInt32): CMError;
  1176.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1177.     INLINE $203C, $000C, $0057, $ABEE;
  1178.     {$ENDC}
  1179.  
  1180. { PS-related }
  1181. FUNCTION CMGetPS2ColorSpace(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1182.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1183.     INLINE $203C, $0014, $002E, $ABEE;
  1184.     {$ENDC}
  1185. FUNCTION CMGetPS2ColorRenderingIntent(srcProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1186.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1187.     INLINE $203C, $0014, $002F, $ABEE;
  1188.     {$ENDC}
  1189. FUNCTION CMGetPS2ColorRendering(srcProf: CMProfileRef; dstProf: CMProfileRef; flags: UInt32; proc: CMFlattenUPP; refCon: UNIV Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1190.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1191.     INLINE $203C, $0018, $0030, $ABEE;
  1192.     {$ENDC}
  1193. FUNCTION CMGetPS2ColorRenderingVMSize(srcProf: CMProfileRef; dstProf: CMProfileRef; VAR vmSize: UInt32; VAR preferredCMMnotfound: BOOLEAN): CMError;
  1194.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1195.     INLINE $203C, $0010, $003D, $ABEE;
  1196.     {$ENDC}
  1197.  
  1198. { ColorSync 1.0 functions which have parallel 2.0 counterparts }
  1199. {$IFC TARGET_OS_MAC }
  1200. FUNCTION CWNewColorWorld(VAR cw: CMWorldRef; src: CMProfileHandle; dst: CMProfileHandle): CMError;
  1201.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1202.     INLINE $203C, $000C, $0000, $ABEE;
  1203.     {$ENDC}
  1204. FUNCTION ConcatenateProfiles(thru: CMProfileHandle; dst: CMProfileHandle; VAR newDst: CMProfileHandle): CMError;
  1205.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1206.     INLINE $203C, $000C, $000C, $ABEE;
  1207.     {$ENDC}
  1208. FUNCTION CMBeginMatching(src: CMProfileHandle; dst: CMProfileHandle; VAR myRef: CMMatchRef): CMError;
  1209.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1210.     INLINE $203C, $000C, $000A, $ABEE;
  1211.     {$ENDC}
  1212. PROCEDURE CMDrawMatchedPicture(myPicture: PicHandle; dst: CMProfileHandle; VAR myRect: Rect);
  1213.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1214.     INLINE $203C, $000C, $0009, $ABEE;
  1215.     {$ENDC}
  1216. FUNCTION CMUseProfileComment(profile: CMProfileHandle): CMError;
  1217.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1218.     INLINE $203C, $0004, $0008, $ABEE;
  1219.     {$ENDC}
  1220. PROCEDURE CMGetProfileName(myProfile: CMProfileHandle; VAR IStringResult: CMIString);
  1221.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1222.     INLINE $203C, $0008, $000E, $ABEE;
  1223.     {$ENDC}
  1224. FUNCTION CMGetProfileAdditionalDataOffset(myProfile: CMProfileHandle): LONGINT;
  1225.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1226.     INLINE $203C, $0004, $000F, $ABEE;
  1227.     {$ENDC}
  1228.  
  1229. { ProfileResponder functions }
  1230. FUNCTION GetProfile(deviceType: OSType; refNum: LONGINT; aProfile: CMProfileHandle; VAR returnedProfile: CMProfileHandle): CMError;
  1231.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1232.     INLINE $203C, $0010, $0005, $ABEE;
  1233.     {$ENDC}
  1234. FUNCTION SetProfile(deviceType: OSType; refNum: LONGINT; newProfile: CMProfileHandle): CMError;
  1235.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1236.     INLINE $203C, $000C, $0006, $ABEE;
  1237.     {$ENDC}
  1238. FUNCTION SetProfileDescription(deviceType: OSType; refNum: LONGINT; deviceData: LONGINT; hProfile: CMProfileHandle): CMError;
  1239.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1240.     INLINE $203C, $0010, $0010, $ABEE;
  1241.     {$ENDC}
  1242. FUNCTION GetIndexedProfile(deviceType: OSType; refNum: LONGINT; search: CMProfileSearchRecordHandle; VAR returnProfile: CMProfileHandle; VAR index: LONGINT): CMError;
  1243.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1244.     INLINE $203C, $0014, $0012, $ABEE;
  1245.     {$ENDC}
  1246. FUNCTION DeleteDeviceProfile(deviceType: OSType; refNum: LONGINT; deleteMe: CMProfileHandle): CMError;
  1247.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1248.     INLINE $203C, $000C, $0013, $ABEE;
  1249.     {$ENDC}
  1250.  
  1251. {$IFC OLDROUTINENAMES }
  1252. { constants }
  1253.  
  1254. CONST
  1255.     kMatchCMMType                = $00000001;
  1256.     kMatchApplProfileVersion    = $00000002;
  1257.     kMatchDataType                = $00000004;
  1258.     kMatchDeviceType            = $00000008;
  1259.     kMatchDeviceManufacturer    = $00000010;
  1260.     kMatchDeviceModel            = $00000020;
  1261.     kMatchDeviceAttributes        = $00000040;
  1262.     kMatchFlags                    = $00000080;
  1263.     kMatchOptions                = $00000100;
  1264.     kMatchWhite                    = $00000200;
  1265.     kMatchBlack                    = $00000400;
  1266.  
  1267. { types }
  1268.  
  1269. TYPE
  1270.     CMYKColor                            = CMCMYKColor;
  1271.     CMYKColorPtr                         = ^CMYKColor;
  1272.     CWorld                                = CMWorldRef;
  1273.     CMGamutResult                        = ^LONGINT;
  1274. { functions }
  1275. PROCEDURE EndMatching(myRef: CMMatchRef);
  1276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1277.     INLINE $203C, $0004, $000B, $ABEE;
  1278.     {$ENDC}
  1279. PROCEDURE EnableMatching(enableIt: BOOLEAN);
  1280.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1281.     INLINE $203C, $0002, $000D, $ABEE;
  1282.     {$ENDC}
  1283. FUNCTION GetColorSyncFolderSpec(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError;
  1284.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1285.     INLINE $203C, $000C, $0011, $ABEE;
  1286.     {$ENDC}
  1287. FUNCTION BeginMatching(src: CMProfileHandle; dst: CMProfileHandle; VAR myRef: CMMatchRef): CMError;
  1288.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1289.     INLINE $203C, $000C, $000A, $ABEE;
  1290.     {$ENDC}
  1291. PROCEDURE DrawMatchedPicture(myPicture: PicHandle; dst: CMProfileHandle; VAR myRect: Rect);
  1292.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1293.     INLINE $203C, $000C, $0009, $ABEE;
  1294.     {$ENDC}
  1295. FUNCTION UseProfile(profile: CMProfileHandle): CMError;
  1296.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1297.     INLINE $203C, $0004, $0008, $ABEE;
  1298.     {$ENDC}
  1299. PROCEDURE GetProfileName(myProfile: CMProfileHandle; VAR IStringResult: CMIString);
  1300.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1301.     INLINE $203C, $0008, $000E, $ABEE;
  1302.     {$ENDC}
  1303. FUNCTION GetProfileAdditionalDataOffset(myProfile: CMProfileHandle): LONGINT;
  1304.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1305.     INLINE $203C, $0004, $000F, $ABEE;
  1306.     {$ENDC}
  1307. {$ENDC}
  1308.  
  1309. {  Deprecated stuff }
  1310.  
  1311. { PrGeneral parameter blocks }
  1312.  
  1313. TYPE
  1314.     TEnableColorMatchingBlkPtr = ^TEnableColorMatchingBlk;
  1315.     TEnableColorMatchingBlk = RECORD
  1316.         iOpCode:                INTEGER;
  1317.         iError:                    INTEGER;
  1318.         lReserved:                LONGINT;
  1319.         hPrint:                    THPrint;
  1320.         fEnableIt:                BOOLEAN;
  1321.         filler:                    SInt8;
  1322.     END;
  1323.  
  1324.     TRegisterProfileBlkPtr = ^TRegisterProfileBlk;
  1325.     TRegisterProfileBlk = RECORD
  1326.         iOpCode:                INTEGER;
  1327.         iError:                    INTEGER;
  1328.         lReserved:                LONGINT;
  1329.         hPrint:                    THPrint;
  1330.         fRegisterIt:            BOOLEAN;
  1331.         filler:                    SInt8;
  1332.     END;
  1333.  
  1334. {$ENDC}  {TARGET_OS_MAC}
  1335.  
  1336. {$ALIGN RESET}
  1337. {$POP}
  1338.  
  1339. {$SETC UsingIncludes := CMApplicationIncludes}
  1340.  
  1341. {$ENDC} {__CMAPPLICATION__}
  1342.  
  1343. {$IFC NOT UsingIncludes}
  1344.  END.
  1345. {$ENDC}
  1346.